$(function() {
	var thisURL = document.URL;  
	var  getval =thisURL.split('?')[1];
	var projectId= getval.split("=")[1];
	var paperId;
	var userid=sessionStorage.getItem("userId");
	
	if(userid!=null&& typeof userid != "undefined"&&userid!=""){  
		
	$.ajax({
		url : "../ProjectPaperController/findByCondition.action",
		dataType :'json',  
		async : false,  
		data:{"projectId":projectId}, 
		success : function(data) {	
		    $.each(data.list, function(i, n) {
				var paperId=n.paperId;  
				if(data.status=="(已测评)"){
					var str='<p>'+n.paperName+data.status+'<span style="color:#8B0000">请及时查看您的报告</span>'+'</p>';
				}
				else{
					var str='<a href="paperDetail.jsp?paperId='+n.paperId+'" style="color:black">'+n.paperName+data.status+'</a><br>';
				}
			    $("#paperName").append(str);   
			});
		},
		error:function(){
		}
	});
	}
	else{
       alert("请你先登录在进行测评"); 
	   window.location.href="/IT_TalentEvaluation/pages/login.jsp";
		
	}
	
});